package ee.homework.second;

public class BinarySearchTree {

	public void binarySearchTree() {
		Node binaryNode = new Node("K");
		binaryNode.leftChild = new Node("C");
		binaryNode.leftChild.leftChild = new Node("B");
		binaryNode.leftChild.leftChild.leftChild = new Node("A");
		binaryNode.leftChild.rightChild = new Node("E");
		binaryNode.leftChild.rightChild.leftChild = new Node("D");
		binaryNode.leftChild.rightChild.rightChild = new Node("G");
		binaryNode.leftChild.rightChild.rightChild.leftChild = new Node("F");
		binaryNode.leftChild.rightChild.rightChild.rightChild = new Node("I");
		binaryNode.leftChild.rightChild.rightChild.rightChild.leftChild = new Node(
				"H");
		binaryNode.leftChild.rightChild.rightChild.rightChild.rightChild = new Node(
				"J");
		binaryNode.rightChild = new Node("L");
		binaryNode.rightChild.rightChild = new Node("N");
		binaryNode.rightChild.rightChild.leftChild = new Node("M");
		binaryNode.rightChild.rightChild.rightChild = new Node("O");
		System.out.print("Inorder treewalk of binary search tree: ");
		// inOrderTreeWalk(binaryNode);
	}

	private class Node {

		private Node leftChild;
		private Node rightChild;
		private String key;

		public Node(String key) {
			this.key = key;
		}
	}

}
